import 'package:flutter/material.dart';

class CustomApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(primarySwatch: Colors.blue),
      home: Scaffold(
        body: Center(
          child: CustomButton('Hello'),
        ),
      ),
    );
  }
}

class CustomButton extends StatelessWidget {
  // 文本
  final String label;

  CustomButton(this.label);

  @override
  Widget build(BuildContext context) {
    return RaisedButton(
      onPressed: () {},
      child: Text(label),
    );
  }
}
